
//
//  GuestViewController.m
//  MyProject
//
//  Created by dllo on 15/11/3.
//  Copyright (c) 2015年 蓝鸥0825. All rights reserved.
//


//      猜猜看一级页面
#import "GuestViewController.h"
#import "WHZAfnetWorking.h"

#define WIDTH self.view.frame.size.width
#define HEIGHT self.view.frame.size.height

@interface GuestViewController ()

@end

@implementation GuestViewController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    

    
    
    self.view1 = [[GuestView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];
    [self.view addSubview:self.view1];
    self.view1.VC = self;
    
    self.hud = [[MBProgressHUD alloc] initWithFrame:CGRectMake(WIDTH / 100 * 40, HEIGHT / 100 * 45, WIDTH / 100 * 5, HEIGHT / 100 * 5)];
    [self.view addSubview:self.hud];
    [self.hud show:YES];
    
    [self createData];
    
   }



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}



- (void)createData{
    
    [WHZAfnetWorking GETJRAfnNetworkingWithUrl:@"http://68.168.105.137/cookbook/master/master.php?email=&appname=com.riatech.cookbook&country=CN&devid=20e94d365e82aa2f&simcountry=cn&version=7.9.2&versioncode=40&lang=zh-CN&inputlang=zh-CN&lurl=cn-rice" WithParameters:nil Block:^(id result) {
        
        self.dicGuest = result;
        self.arrGuest = [NSMutableArray array];
        self.arrGuest = self.dicGuest[@"list"];
        self.view1.arrayGuest = self.arrGuest;
        [self.view1.collectionView reloadData];
        [self.hud hide:YES];
    }];

    
}










@end
